package com.hp.tiger.concurrent.classloader.chapter2;

/**
 * @author XavierDong
 **/
public class BootClassLoader {


    public static void main(String[] args) throws ClassNotFoundException {
        System.out.println(System.getProperty("sun.boot.class.path"));
        System.out.println(System.getProperty("java.ext.dirs"));
        Class<?> aClass = Class.forName("com.hp.tiger.concurrent.classloader.chapter2.SimpleObject");
//        sun.misc.Launcher$AppClassLoader@18b4aac2
        System.out.println(aClass.getClassLoader());
//        sun.misc.Launcher$ExtClassLoader@3764951d
        System.out.println(aClass.getClassLoader().getParent());
//        null 因为c++编写的
        System.out.println(aClass.getClassLoader().getParent().getParent());


        Class<?> aClass1 = Class.forName("java.lang.String");
        System.out.println(aClass1);
        // null
        System.out.println(aClass1.getClassLoader());

    }
}
